#ifndef __TGBOT_DBPART_H__
#define __TGBOT_DBPART_H__

#include <global.h>
#include <map>
#include <vector>
#include "def.h"
#include "baseDbPart.h"
#include "RedisClient.h"
#include "json.h"


class CDbPart 
{
public:
	CDbPart();
	virtual ~CDbPart();

public:
	// 获取tg bot配置数据
	const std::map<std::string, std::string>& GetTgBotCfgMap() const;

public:
	bool CheckServerReady();  						// 检查redis是否创建
	void UpdatePhpCfg(const std::string& name);		// php配置更新事件处理
	bool LoadTgBotCfg(const std::string& phpKey);	// tgBot配置
	
public:
	RedisClient* m_configRedis;

private:
	std::map<std::string, std::string> tgBotCfg_Map;// bot配置数据{message_type,bot_token,send_limit}
};

#endif
